import request from '@/utils/request'

// 查询BOM列表
export function queryBomList(data) {
    return request({
        url: '/advertising/queryPageList',
        method: 'post',
        data
    })
}
// 查询BOM详情
export function queryBomInfo(id) {
    return request({
        url: `/advertising/detail/${id}`,
        method: 'get'
    })
}
// 新增BOM
export function addBom(data) {
    return request({
        url: '/advertising/add',
        method: 'post',
        data
    })
}

// 修改BOM
export function updateBom(data) {
    return request({
        url: '/advertising/update/advertising',
        method: 'post',
        data
    })
}


// 删除BOM
export function deleteBom(id) {
    return request({
        url: `/advertising/delete/${id}`,
        method: 'delete'
    })
}


// 修改BOM状态
export function updateAdvertisingClassifyStatus(data) {
    return request({
        url: '/advertising/update/status',
        method: 'post',
        data
    })
}
// 获取BOM分类
export function getTreeData(params) {
    return request({
        url: '/advertisingClassify/treeSelect',
        method: 'get',
        params
    })
}